package org.net.cms.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StudentApplicationEnums {
    NO_PASS(0, "未通过"),
    PASS(1, "已通过"),
    PENDING_APPROVAL(2, "待审核"),
    DOES_NOT_EXIST(3, "不存在"),

    UNBIND_PENDING_APPROVAL(4, "解绑待审核"),
    UNBIND_PASS(5, "解绑已通过"),
    UNBIND_NO_PASS(6, "解绑未通过");

    private final Integer status;
    private final String desc;

    /**
     * 根据状态码获取描述信息
     *
     * @param status 状态码
     * @return 描述，若未找到返回 null 或默认值
     */
    public static String getDescByStatus(Integer status) {
        for (StudentApplicationEnums value : StudentApplicationEnums.values()) {
            if (value.status.equals(status)) {
                return value.desc;
            }
        }
        return null;
    }
}
